
<?php
		
	
	
	//connect to your database ** EDIT REQUIRED HERE **
	include('config.php');
	include('common-functions.php');
	
	/******************************/
	//         GLOBAL VARIABLE   
	/******************************/
	$userID          = $_POST['userid'];
	$artifactsId     = $_POST["artifactsId"];
	

	/******************************/
	
		
	$query = "DELETE FROM tbartifacts
			  WHERE tbartifacts.Id = ".$artifactsId." AND tbArtifacts.Author = ".$userID." ";
			  
		 
	$numresults = mysql_query($query);
	 
	if (!$numresults) 
	{
		die('Invalid query: ' . mysql_error());
	}
					
		 			
	echo ("<h>APAGOU !</h>" );
	redirect('../index.php');
		
	
	  
?>